<?php 
namespace app\api\controller\v1;

use think\Db;


//平台
class PlatformController extends UserBaseController{

	function  list(){
		$rows = app\common\model\ThirdapiModel::$platform;
		//查找我的平台
		$all = Db::name('third_api')->where('uid',$this->user['id'])->select()->toArray();
		foreach ($rows as $key => &$value) {
			$p = get_one_by_item($all,'platform',$value['title']);
			$value['status'] = intval($p['status']);
			$value['status_title'] = app\common\model\ThirdapiModel::$status_titles[$value['status']];

		}
		return json(['error'=>0,'msg'=>$this->lang['SUCCESS'],'data'=>$rows]);
	}
}